A portion of the disclosure of this patent document contains material to which a claim of copyright protection is made. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure as it appears in the Patent and Trademark Office patent file or records, but reserves all other rights whatsoever.
The present invention relates to graphical programming, and in particular to a system for creating graphical programs, wherein the graphical programs are operable to access functionality or properties of objects.
Traditionally, high level text-based programming languages have been used by programmers in writing applications programs. Many different high level programming languages exist, including BASIC, C, FORTRAN, Pascal, COBOL, ADA, APL, etc. Programs written in these high level languages are translated to the machine language level by translators known as compilers. The high level programming languages in this level, as well as the assembly language level, are referred to as text-based programming environments.
Increasingly computers are required to be used and programmed by those who are not highly trained in computer programming techniques. When traditional text-based programming environments are used, the user""s programming skills and ability to interact with the computer system often become a limiting factor in the achievement of optimal utilization of the computer system.
There are numerous subtle complexities which a user must master before he/she can efficiently program a computer system in a text-based environment. The task of programming a computer system to model a process often is further complicated by the fact that a sequence of mathematical formulas, mathematical steps or other procedures customarily used to conceptually model a process often does not closely correspond to the traditional text-based programming techniques used to program a computer system to model such a process. In other words, the requirement that a user program in a text-based programming environment places a level of abstraction between the user""s conceptualization of the solution and the implementation of a method that accomplishes this solution in a computer program. Thus, a user often must substantially master different skills in order to both conceptually model a system and then to program a computer to model that system. Since a user often is not fully proficient in techniques for programming a computer system in a text-based environment to implement his model, the efficiency with which the computer system can be utilized to perform such modeling often is reduced.
Examples of fields in which computer systems are employed to model and/or control physical systems are the fields of instrumentation, process control, and industrial automation. Computer modeling or control of devices such as instruments or industrial automation hardware has become increasingly desirable in view of the increasing complexity and variety of instruments and devices available for use. However, due to the wide variety of possible testing/control situations and environments, and also the wide array of instruments or devices available, it is often necessary for a user to develop a program to control a desired system. As discussed above, computer programs used to control such systems had to be written in conventional text-based programming languages such as, for example, assembly language, C, FORTRAN, BASIC, or Pascal. Traditional users of these systems, however, often were not highly trained in programming techniques and, in addition, traditional text-based programming languages were not sufficiently intuitive to allow users to use these languages without training. Therefore, implementation of such systems frequently required the involvement of a programmer to write software for control and analysis of instrumentation or industrial automation data. Thus, development and maintenance of the software elements in these systems often proved to be difficult.
U.S. Pat. No. 4,901,221 to Kodosky et al discloses a graphical system and method for modeling a process, i.e., a graphical programming environment, which enables a user to easily and intuitively model a process. The graphical programming environment disclosed in Kodosky et al can be considered the highest and most intuitive way in which to interact with a computer. A graphically based programming environment can be represented at level above text-based high level programming languages such as C, Pascal, etc. The method disclosed in Kodosky et al allows a user to construct a diagram using a block diagram editor, such that the diagram created graphically displays a procedure or method for accomplishing a certain result, such as manipulating one or more input variables to produce one or more output variables. In response to the user constructing a data flow diagram or graphical program using the block diagram editor, machine language instructions are automatically constructed which characterize an execution procedure which corresponds to the displayed procedure. Therefore, a user can create a computer program solely by using a graphically based programming environment. This graphically based programming environment may be used for creating virtual instrumentation systems, industrial automation systems and modeling processes, as well as for any type of general programming.
Therefore, Kodosky et al teaches a graphical programming environment wherein a user places or manipulates icons in a block diagram using a block diagram editor to create a data flow xe2x80x9cprogram.xe2x80x9d A graphical program for controlling or modeling devices, such as instruments, processes or industrial automation hardware, is referred to as a virtual instrument (VI). In creating a virtual instrument, a user preferably creates a front panel or user interface panel. The front panel includes various front panel objects, such as controls or indicators that represent the respective input and output that will be used by the graphical program or VI, and may include other icons which represent devices being controlled. When the controls and indicators are created in the front panel, corresponding icons or terminals are automatically created in the block diagram by the block diagram editor. Alternatively, the user can first place terminal icons in the block diagram which cause the display of corresponding front panel objects in the front panel. The user then chooses various functions that accomplish his desired result, connecting the corresponding function icons between the terminals of the respective controls and indicators. In other words, the user creates a data flow program, referred to as a block diagram, representing the graphical data flow which accomplishes his desired function. This is done by wiring up the various function icons between the control icons and indicator icons. The manipulation and organization of icons in turn produces machine language that accomplishes the desired method or process as shown in the block diagram.
A user inputs data to a virtual instrument using front panel controls. This input data propagates through the data flow block diagram or graphical program and appears as changes on the output indicators. In an instrumentation application, the front panel can be analogized to the front panel of an instrument. In an industrial automation application the front panel can be analogized to the MMI (Man Machine Interface) of a device. The user adjusts the controls on the front panel to affect the input and views the output on the respective indicators.
Thus, graphical programming has become a powerful tool available to programmers. Graphical programming environments such as the National Instruments LabVIEW product have become very popular. Tools such as LabVIEW have greatly increased the productivity of programmers, and increasing numbers of programmers are using graphical programming environments to develop their software applications. In particular, graphical programming tools are being used for test and measurement, data acquisition, process control, man machine interface (MMI), and supervisory control and data acquisition (SCADA) applications, among others.
In parallel to the development of graphical data flow programming for various applications, such as virtual instrumentation, object and/or component technology has emerged in the area of software development. The notion of object technology relates to an application program or object using capabilities or services of an object. For example, object technology includes the notion of xe2x80x9cserversxe2x80x9d xe2x80x9cexportingxe2x80x9d their xe2x80x9cobjectsxe2x80x9d for use by xe2x80x9cclients.xe2x80x9d A server is a software application which makes available its classes to be accessed from another application, referred to as a client. A client instantiates objects from the classes in the type libraries. In addition, the term xe2x80x9cobjectxe2x80x9d also includes various other types of components or objects, including applications, which offer services or functionality that can be accessed by a client.
Objects generally have properties and methods. Properties are the data associated with the object and typically determine attributes of the object, such as the number of columns of a spreadsheet. Methods are functions or operations which the object is capable of performing, such as drawing a spreadsheet on a display screen. A server exports an object by making the methods and properties of the object invokable by a client.
An example of a server is Microsoft Excel(copyright) which exports its objects for use by clients. An example of an object technology is Active X, formerly called OLE (Object Linking and Embedding), promulgated by Microsoft. For example, the Microsoft Excel spreadsheet program, the Microsoft Access(copyright) database program, and the Microsoft Word(copyright) word processing program, all export objects using the Active X interface. Active X is an industry standard object or component interface used by application programs to provide objects in a consistent manner to other application programs, development tools, and macro languages. Other examples of object technologies are OpenDoc(copyright) and the Common Object Request Broker Architecture (CORBA).
It is desirable for a program, such as a graphical program, to be able to access functionality provided by an object or server. For example, often it is desirable for a program, such as a graphical program, to display, manipulate, catalog, edit or perform other operations, such as may be performed by an object or server, on data acquired or generated by a graphical program or virtual instrument. For example, it may be desirable for a virtual instrument to display acquired temperature samples in a spreadsheet, such as a Microsoft Excel spreadsheet. More generally, it would be desirable to provide a system and method which enables a graphical program to be able to invoke objects, such as from a server, for a variety of applications.
Therefore, improved methods are desired for enabling a graphical data flow programming system to access objects. More particularly, an improved system and method is desired which enables a graphical data flow program to be constructed which uses capabilities of objects.
The present invention comprises a system and method for creating a graphical program, wherein the graphical program is operable to access capabilities of an object. The present invention preferably operates in a computer including a display screen and a user input device.
During creation of the graphical program, the user operates to place an object node in the graphical program, wherein the object node is operable to access capabilities of the object. Stated another way, during program creation the computer system displays on the screen an object node in the graphical program in response to user input, wherein the object node is operable to access capabilities of the object. This preferably includes the user arranging on the screen the graphical program, including the object node. The graphical program will typically comprise a plurality of nodes, and the method for creating the graphical program comprises arranging on the screen the plurality of nodes, including the object node, and connecting the various nodes to create the graphical program. In the preferred embodiment, the nodes are connected in a data flow paradigm.
The user then configures the object node to receive information on the object, preferably by the user configuring the object node with a reference to the object, e.g., a pointer, address, or other information which specifies the identity and/or location of the object. This preferably includes the user selecting a class of the object. In the preferred embodiment, the object node includes an object reference input for receiving a reference to the object, and the user connects the object reference input of the object node to receive the reference to the object. This preferably includes the user placing an object reference node in the graphical program, wherein the object reference node includes an object reference output that provides the reference to the object, and the user connecting the object reference output of the object reference node to the object reference input of the object node. The object node then receives the information on the object on the object reference input during execution of the graphical program.
Creation of the graphical program may also include configuring a user interface to display data input to and/or output from the graphical program. Once the graphical program has been created, then during execution of the graphical program, the object node accesses the capabilities of the object. More specifically, after creation of the graphical program, the system/method constructs execution instructions in response to the graphical program, wherein the execution instructions are executable to access the capabilities of the object. When these execution instructions are executed, the object node accesses the capabilities of the object.
In the preferred embodiment, the object may be any of various types of software, such as a software object according to the standard principles of object-oriented software, a software component, other types of re-usable software elements, or an application, among others. Where the object is a software object or component, the object node is executable to either invoke a method of the object, get and/or set one or more properties of the object, or access other capabilities of the object. Where the object is an application, the object node is operable to perform one or more of 1) initiate execution of the application; or 2) get/set one or more properties of the application. Also, the object may reside in the same computer where the graphical program is being created, or may reside in a different computer connected through a network.
In the preferred embodiment, the graphical program comprises a diagram or execution portion and a user interface portion, and the object node is comprised in the diagram portion. Alternatively, the object node may be comprised in the user interface portion. In this case where the object node is located in the user interface, the object is preferably comprised in the object node, and the object node operates to manipulate the object. For example, a document may be comprised in the object node, wherein the object node is operable to display changes to the document during execution of the graphical program. As another example, the object may be a user interface element, such as a control or indicator, wherein the object node is operable to affect the data input to or output from the control or indicator - - - . - - - .